#pragma once

#include <iostream>
#include <vector>
#include <ctime>

typedef void(*task_t)();

void PrintLog()
{

}

void DownLoad()
{

}
class TaskManager
{
public:
    TaskManager()
    {
        srand(time(nullptr));
    }
    void Register(task_t t)
    {
        _tasks.push_back(t);
    }
    void Execute(int code)
    {   
        if(code >= 0 && code < _tasks.size())
        {
            _tasks[code]();
        }
    }
    int Code()
    {
        return rand() % _tasks.size();
    }
private:
    std::vector<task_t> _tasks;
};